queryGiftCard
HTTP method: POST
https://testgateway.altapaysecure.com/merchant/API/queryGiftCard
This method is used to get the balance on a gift card.
Request parameters
Response parameters
The table shows the most pertinent response values for the method. For a complete list of API response parameters, see API Response structure (XML).
Parameter | Description | Type |
---|---|---|
Currency | The three letter currency code. | string |
Balance | The balance of the gift card in the given currency. | float |
Examples
Request
curl --request POST \ --url https://<YourShopName>.altapaysecure.com/merchant/API/queryGiftCard \ --header 'Authorization: Basic auth' \ --data terminal='My terminal' \ --data giftcard[account_identifier]=159753 \ --data giftcard[provider]=test \
XML response
<?xml version="1.0" encoding="utf-8" ?> <APIResponse version="20170228"> <Header> <Date>2020-09-29T12:34:56+02:00</Date> <Path>API/queryGiftCard</Path> <ErrorCode>0</ErrorCode> <ErrorMessage></ErrorMessage> </Header> <Body> <Result>Success</Result> <Accounts> <Account> <Currency>EUR</Currency> <Balance>50.00</Balance> </Account> <Account> <Currency>DKK</Currency> <Balance>25.00</Balance> </Account> </Accounts> </Body> </APIResponse>
Test case data
- For gift card payments, see Gift card payments .
Next steps
After you have queried a gift card, you can create a gift card payment, for example, using the createPaymentRequest method.